#include <OSGEventHandler.h>
Public Member Functions | |
| OSGEventHandler (osg::ref_ptr< osgProducer::Viewer > viewer, CMainFrame *newFrame) | |
| ~OSGEventHandler () | |
| bool | handle (const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &us) |
| void | drawVehicleDodge (const osgGA::GUIEventAdapter &ea) |
| void | drawVehicleSemi (const osgGA::GUIEventAdapter &ea) |
| void | drawSign (const osgGA::GUIEventAdapter &ea) |
| void | drawLight (const osgGA::GUIEventAdapter &ea) |
| void | drawTree (const osgGA::GUIEventAdapter &ea) |
| void | drawBuilding (const osgGA::GUIEventAdapter &ea) |
| void | select (const osgGA::GUIEventAdapter &ea) |
| void | roadPick (const osgGA::GUIEventAdapter &ea) |
| bool | drawRoad (const osgGA::GUIEventAdapter &ea) |
| bool | rightClickMenu (const osgGA::GUIEventAdapter &ea) |
| void | drag (TraffEduObject *dragObject, const osgGA::GUIEventAdapter &ea) |
| void | calculateNewPosition (const osgGA::GUIEventAdapter &ea) |
| void | calculateOldPosition (const osgGA::GUIEventAdapter &ea) |
Private Attributes | |
| DrawMode | drawMode |
| osg::ref_ptr< osgProducer::Viewer > | _viewer |
| CMainFrame * | frame |
| TraffEduObject * | dragObject |
| boolean | defaultMouse |
| boolean | rightMenu |
| osg::Vec3 | old_position |
| osg::Vec3 | new_position |
| TraffEduObject * | translatedObj |
Definition at line 13 of file OSGEventHandler.h.
|
||||||||||||
|
Constructor for the OSGEventHandler class.
Definition at line 32 of file OSGEventHandler.h. References defaultMouse, frame, and rightMenu. |
|
|
Destructor for the OSGEventHandler class. Definition at line 39 of file OSGEventHandler.h. |
|
|
Responsible from the execute/undo opearion of a translate.
Definition at line 16 of file OSGEventHandler.cpp. References _viewer, and new_position. Referenced by handle(). |
|
|
Responsibe from the execute/undo opearion of a translate.
Definition at line 29 of file OSGEventHandler.cpp. References _viewer, and old_position. |
|
||||||||||||
|
Drags the selected object.
Definition at line 41 of file OSGEventHandler.cpp. References _viewer, dragFlag, TraffEduObject::getPAT(), OSGWindows::getSelectedObjects(), and osgwind. |
|
|
Draws the Environmental Object Building.
Definition at line 114 of file OSGEventHandler.cpp. References _viewer, OSGWindows::addCommandInsertEnvObj(), and osgwind. |
|
|
Draws the Traffic Light.
Definition at line 84 of file OSGEventHandler.cpp. References _viewer, OSGWindows::addCommandInsertTrafficLight(), frame, and osgwind. |
|
|
Draws the Road, in association with the roadPick.
Definition at line 149 of file OSGEventHandler.cpp. References frame, and roadPick(). |
|
|
Draws the Traffic Sign.
Definition at line 166 of file OSGEventHandler.cpp. References _viewer, OSGWindows::addCommandInsertTrafficSign(), frame, and osgwind. |
|
|
Draws the Environmental Object Tree.
Definition at line 99 of file OSGEventHandler.cpp. References _viewer, OSGWindows::addCommandInsertEnvObj(), and osgwind. |
|
|
Draws the Vehicle Dodge.
Definition at line 182 of file OSGEventHandler.cpp. References _viewer, OSGWindows::addCommandInsertVehicle(), and osgwind. |
|
|
Draws the Vehicle Semi.
Definition at line 197 of file OSGEventHandler.cpp. References _viewer, OSGWindows::addCommandInsertVehicle(), and osgwind. |
|
||||||||||||
|
Main function in the OSGEventHandler class to deal with the users mouse and Keyboard actions.
Definition at line 352 of file OSGEventHandler.cpp. References OSGWindows::addCommandTranslate(), calculateNewPosition(), defaultMouse, dragFlag, dragObject, DRAW_ROAD, frame, OSGWindows::getCurrentFrameId(), new_position, old_position, osgwind, rightClickMenu(), rightMenu, SELECT, and translatedObj. |
|
|
Pops-up rightClick menus.
Definition at line 215 of file OSGEventHandler.cpp. References OSGWindows::addCommandDeselectAll(), dragFlag, frame, OSGWindows::getSelectedObjects(), osgwind, rightMenu, and SELECT. Referenced by handle(). |
|
|
Gets the Road control points.
Definition at line 130 of file OSGEventHandler.cpp. References _viewer, RoadMap::addPoint(), RoadMap::getLastRoadIndex(), RoadMap::setActiveRoadIndex(), and theRoadMap. Referenced by drawRoad(). |
|
|
Selects (ie. highlights) object..
Definition at line 308 of file OSGEventHandler.cpp. References _viewer, OSGWindows::addCommandSelect(), and osgwind. |
|
|
Definition at line 16 of file OSGEventHandler.h. Referenced by calculateNewPosition(), calculateOldPosition(), drag(), drawBuilding(), drawLight(), drawSign(), drawTree(), drawVehicleDodge(), drawVehicleSemi(), roadPick(), and select(). |
|
|
Definition at line 19 of file OSGEventHandler.h. Referenced by handle(), and OSGEventHandler(). |
|
|
Definition at line 18 of file OSGEventHandler.h. Referenced by handle(). |
|
|
Definition at line 15 of file OSGEventHandler.h. |
|
|
Definition at line 17 of file OSGEventHandler.h. Referenced by drawLight(), drawRoad(), drawSign(), handle(), OSGEventHandler(), and rightClickMenu(). |
|
|
Definition at line 23 of file OSGEventHandler.h. Referenced by calculateNewPosition(), and handle(). |
|
|
Definition at line 22 of file OSGEventHandler.h. Referenced by calculateOldPosition(), and handle(). |
|
|
Definition at line 20 of file OSGEventHandler.h. Referenced by handle(), OSGEventHandler(), and rightClickMenu(). |
|
|
Definition at line 24 of file OSGEventHandler.h. Referenced by handle(). |
1.4.6-NO